import Vue from 'vue'
import Router from 'vue-router'

//登录模块
import LoginRegister from '@/pages/login/LoginRegister'
import Register from '@/pages/login/Register'
import Login from '@/pages/login/Login'
import Forget from '@/pages/login/Forget'

//首页
import Home from '@/pages/Home'
//首页
import MIndex from '@/pages/index/MIndex'
//新手指引
import NewPlayer from '@/pages/newplayer/NewPlayer'
////////////////////////////策略页面
import Cl from '@/pages/cl/Cl'
// 首页推荐
import Recommend from '@/pages/cl/components/Recommend'
//创建策略
import Create from '@/pages/cl/components/Create'
//当前策略
import Now2 from '@/pages/cl/components/Now'
//策略历史
import ClHistory from '@/pages/cl/components/History'
//////////////////公司介绍
import CompangMsg from '@/pages/forme/CompanyMsg'
//////////////个人中心
import Me from '@/pages/me/Me'
import Msg from '@/pages/me/Msg'
// import CardController from '@/pages/me/CardController' 银行卡管理
import Recharge from '@/pages/me/Recharge'
import Charge from '@/pages/me/Charge'
import MoneyMsg from '@/pages/me/MoneyMsg'
//////////////个人中心结束
import CreateXy from '@/pages/cl/CreateXy'

Vue.use(Router)

export default new Router({
    routes: [
        //首页
        {
            path: '',
            component: Home,
            children: [
                //创建策略时的协议
                {
                    path : "/CreateXy",
                    component: CreateXy
                },
                //首页
                {
                    path: '',
                    component: MIndex
                },
                //个人中心
                {
                    path: 'me',
                    component: Me,
                    children:[
                        {
                            path:'',
                            component: Recharge
                        },
                        // {
                        //     path : 'cardController',
                        //     component:CardController
                        // },
                        {
                            path:'recharge',
                            component: Recharge
                        },
                        {
                            path:'charge',
                            component:Charge
                        },
                        {
                            path:'MoneyMsg',
                            component:MoneyMsg
                        }
                    ]
                },
                //公司介绍
                {
                    path: 'compangMsg',
                    component: CompangMsg
                },
                //新手指引
                {
                    path: 'newplayer',
                    component: NewPlayer
                },
                //策略页面
                {
                    path: 'cl',
                    component: Cl,
                    children: [
                        //默认推荐
                        {
                            path: 'recommend',
                            component: Recommend
                        },
                        //创建策略
                        {
                            path: 'create',
                            component: Create
                        },
                        //当前策略
                        {
                            path: 'now',
                            component: Now2
                        },
                        //历史策略
                        {
                            path: 'history',
                            component: ClHistory
                        }
                    ]
                }
            ]
        },
        //登录模块
        {
            path: '/login',
            component: LoginRegister,
            children: [{
                    path: 'register',
                    component: Register
                },
                {
                    path: 'login',
                    component: Login
                },
                {
                    path: 'forget',
                    component: Forget
                }
            ]
        }
    ]
})